/*
 *    Copyright © OpenAtom Foundation.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.inspur.edp.udt.generator.api.entityinterface.complexudt;


import com.inspur.edp.cef.generator.apiGenerator.dataType.entityInterface.DataTypeInterfaceGeneratorContext;
import com.inspur.edp.udt.designtime.api.entity.ComplexDataTypeDef;
import com.inspur.edp.udt.designtime.api.entity.element.UdtElement;
import com.inspur.edp.udt.generator.api.entityinterface.valueobjinfo.ValueObjInfoGenerator;
import com.inspur.edp.udt.generator.api.entityinterface.valueobjinfo.propinfo.UdtPropInfoGenerator;
import com.inspur.edp.udt.spi.ValuObjInfo.ComplexUdt.ComplexUdtInfo;

public class ComplexUdtInfoGenerator extends ValueObjInfoGenerator
{
	private ComplexDataTypeDef cUdt;
	public ComplexUdtInfoGenerator(DataTypeInterfaceGeneratorContext parentContext)
	{
		super(parentContext);
		cUdt = (ComplexDataTypeDef)parentContext.getDataType();
	}

	@Override
	protected void beforeInitialize()
	{
		super.beforeInitialize();
		//Java版临时注释：国际化。
//		CefResourceExtractContext context = new CefResourceExtractContext(cUdt.getAssemblyName(), new I18nResourceItemCollection());
//		ComplexUdtReourceExtractor extractor = new ComplexUdtReourceExtractor(cUdt, context);
//		extractor.Extract();
	}

	@Override
	protected java.lang.Class getValueObjInfoParentClassType()
	{
		return ComplexUdtInfo.class;
	}

	@Override
	protected UdtPropInfoGenerator CreateUdtPropInfoGeneraotor(UdtElement field)
	{
		return new ComplexUdtPropInfoGenerator(getContext(), field);
	}
}
